<HTML>
<BODY>
</PRE>
<H2>NAME</H2><PRE>
        <B>ftpd.efi</B> - Internet File Transfer Protocol server protocol

</PRE>
<H2>SYNOPSIS</H2><PRE>
        <B>load ftpd.efi</B>

</PRE>
<H2>DESCRIPTION</H2><PRE>
        <B>Ftpd.efi</B> is an EFI port of the BSD FTP server. The complete BSD man page <B>FTPD(8)</B>
        is listed below for reference.  However, the following features are different or
        not supported by <B>ftpd.efi</B>.
<BLOCKQUOTE><UL>
<LI>Only one client connection at a time allowed.
<LI>Anonymous login only (&quot;anonymous&quot; or &quot;ftp&quot;).
<LI>No file permission or access secuirty.  Clients have full r/w access.
<LI>All transfers are done in binary mode.
<LI>No command line switches are supported.
<LI>&quot;Site&quot; (chmod, umask, idle) commands not supported.
<LI>Virtual hosts not supported.
<LI>The FTP server will sign on with the system name if the <B>hostname</B> command is
first used to establish a system name.
<LI>The EFI shell program <B><A HREF="ftpctrl.html">ftpctrl</A/></B> is used to stop the server, get status, and
adjust run-time settings.
<LI>The FTP client can navigate to different EFI file systems using 'cd FSx:',
where FSx: is the EFI device name mapping to another file system.
<LI>The default inactivity timeout is set to 7200 ( 2 hrs. ).
</UL></BLOCKQUOTE>

        <B>Ftpd.efi </B>is started using the EFI <B>load</B> command.  Only one copy can be loaded at
        a time.  The shell program <B>ftpctrl</B> is used to stop and unload the server.
        Once started, <B>ftpd.efi</B> runs in the background using an EFI timer event to poll
        for network activity.  Because of the polled nature of EFI and <B>ftpd.efi</B>, file
        transfer performance and its impact to foreground programs, like the EFI shell,
        will vary depending on the speed of the system.  The shell program <B>ftpctrl</B>
        can be used to adjust how much CPU will be used (nice factor) by <B>ftpd.efi</B> during
        file transfers.

</PRE>
<H2>EXAMPLES</H2><PRE>
        What follows is an example EFI shell script to load and configure the FTP server.
        The script establishes a host name, loads the FTP server, then configures the
        inactivity timeout to 300 (5 minutes).

            hostname LION_EFI_10
            load ftpd.efi
            ftpctrl -t 300

</PRE>
<H2>SEE ALSO</H2><PRE>
        <B><A HREF="ftpctrl.html">ftpctrl(8)</A></B>

Original BSD man page for ftpd:

<PRE><HR><!-- Manpage converted by man2html 3.0.1 -->

<B>FTPD(8)</B> 		FreeBSD System Manager's Manual 	       <B>FTPD(8)</B></PRE></PRE>
<H2>NAME</H2><PRE>     <B>ftpd</B> - Internet File Transfer Protocol server</PRE>
<H2>SYNOPSIS</H2><PRE>     <B>ftpd</B> [<B>-dl</B>] [<B>-A</B>] [<B>-D</B>] [<B>-R</B>] [<B>-S</B>] [<B>-U</B>] [<B>-T</B> <I>maxtimeout</I>] [<B>-t</B> <I>timeout</I>] [<B>-a</B>
	  <I>address</I>] [<B>-p</B> <I>file</I>]</PRE>
<H2>DESCRIPTION</H2><PRE>     <B>Ftpd</B> is the Internet File Transfer Protocol server process.  The server
     uses the TCP protocol and listens at the port specified in the ``ftp''
     service specification; see <B>services(5)</B>.

     Available options:

     <B>-d</B>      Debugging information is written to the syslog using LOG_FTP.

     <B>-l</B>      Each successful and failed <B><A HREF="ftp.html">ftp(1)</A></B> session is logged using syslog
	     with a facility of LOG_FTP.  If this option is specified twice,
	     the retrieve (get), store (put), append, delete, make directory,
	     remove directory and rename operations and their filename argu-
	     ments are also logged.  Note: LOG_FTP messages are not displayed
	     by <B>syslogd(8)</B> by default, and may have to be enabled in
	     <B>syslogd(8)</B>'s  configuration file.

     <B>-D</B>      With this option set, <B>ftpd</B> will detach and become a daemon, ac-
	     cepting connections on the FTP port and forking children process-
	     es to handle them. This is lower overhead than starting <B>ftpd</B> from
	     <B>inetd(8)</B> and is thus useful on busy servers to reduce load.

     <B>-R</B>      With this option set, <B>ftpd</B> will revert to historical behavior
	     with regard to security checks on user operations and restric-
	     tions on PORT requests.  Currently, <B>ftpd</B> will only honor PORT
	     commands directed to unprivileged ports on the remote user's host
	     (which violates the FTP protocol specification but closes some
	     security holes).

     <B>-S</B>      With this option set, <B>ftpd</B> logs all anonymous transfers to the
	     file <I>/var/log/ftpd</I> when this file exists.

     <B>-U</B>      In previous versions of <B>ftpd</B>, when a passive mode client request-
	     ed a data connection to the server, the server would use data
	     ports in the range 1024..4999.  Now, by default, the server will
	     use data ports in the range 49152..65535.	Specifying this option
	     will revert to the old behavior.

     <B>-T</B>      A client may also request a different timeout period; the maximum
	     period allowed may be set to <I>timeout</I> seconds with the <B>-T</B> option.
	     The default limit is 2 hours.

     <B>-t</B>      The inactivity timeout period is set to <I>timeout</I> seconds (the de-
	     fault is 15 minutes).

     <B>-a</B>      When <B>-D</B> is specified, accept connections only on the specified
	     <I>address</I>.

     <B>-p</B>      When <B>-D</B> is specified, write the daemon's process ID to <I>file</I>.

     <B>-A</B>      Allow only anonymous ftp access.

     The file <I>/var/run/nologin</I> can be used to disable ftp access.  If the file
     exists, <B>ftpd</B> displays it and exits.  If the file <I>/etc/ftpwelcome</I> exists,
     <B>ftpd</B> prints it before issuing the ``ready'' message.  If the file
     <I>/etc/ftpmotd</I> exists, <B>ftpd</B> prints it after a successful login.  Note the
     motd file used is the one relative to the login environment.  This means
     the one in <I>~ftp/etc</I> in the anonymous user's case.

     The ftp server currently supports the following ftp requests.  The case
     of the requests is ignored.

	   <B>Request</B>    <B>Description</B>
	   ABOR       abort previous command
	   ACCT       specify account (ignored)
	   ALLO       allocate storage (vacuously)
	   APPE       append to a file
	   CDUP       change to parent of current working directory
	   CWD	      change working directory
	   DELE       delete a file
	   HELP       give help information
	   LIST       give list files in a directory (``ls -lgA'')
	   MKD	      make a directory
	   MDTM       show last modification time of file
	   MODE       specify data transfer <I>mode</I>
	   NLST       give name list of files in directory
	   NOOP       do nothing
	   PASS       specify password
	   PASV       prepare for server-to-server transfer
	   PORT       specify data connection port
	   PWD	      print the current working directory
	   QUIT       terminate session
	   REST       restart incomplete transfer
	   RETR       retrieve a file
	   RMD	      remove a directory
	   RNFR       specify rename-from file name
	   RNTO       specify rename-to file name
	   SITE       non-standard commands (see next section)
	   SIZE       return size of file
	   STAT       return status of server
	   STOR       store a file
	   STOU       store a file with a unique name
	   STRU       specify data transfer <I>structure</I>
	   SYST       show operating system type of server system
	   TYPE       specify data transfer <I>type</I>
	   USER       specify user name
	   XCUP       change to parent of current working directory
		      (deprecated)
	   XCWD       change working directory (deprecated)
	   XMKD       make a directory (deprecated)
	   XPWD       print the current working directory (deprecated)
	   XRMD       remove a directory (deprecated)

     The following non-standard or UNIX specific commands are supported by the
     SITE request.

	   <B>Request</B>    <B>Description</B>
	   UMASK      change umask, e.g. ``SITE UMASK 002''
	   IDLE       set idle-timer, e.g. ``SITE IDLE 60''
	   CHMOD      change mode of a file, e.g. ``SITE CHMOD 755 filename''
	   HELP       give help information

     The remaining ftp requests specified in Internet RFC 959 are recognized,
     but not implemented.  MDTM and SIZE are not specified in RFC 959, but
     will appear in the next updated FTP RFC.

     The ftp server will abort an active file transfer only when the ABOR com-
     mand is preceded by a Telnet &quot;Interrupt Process&quot; (IP) signal and a Telnet
     &quot;Synch&quot; signal in the command Telnet stream, as described in Internet RFC
     959.  If a STAT command is received during a data transfer, preceded by a
     Telnet IP and Synch, transfer status will be returned.

     <B>Ftpd</B> interprets file names according to the ``globbing'' conventions used
     by <B>csh(1)</B>.  This allows users to utilize the metacharacters ``*?[]{}~''.

     <B>Ftpd</B> authenticates users according to five rules.

	   1.	The login name must be in the password data base and not have
		a null password.  In this case a password must be provided by
		the client before any file operations may be performed.  If
		the user has an S/Key key, the response from a successful USER
		command will include an S/Key challenge. The client may choose
		to respond with a PASS command giving either a standard pass-
		word or an S/Key one-time password. The server will automati-
		cally determine which type of password it has been given and
		attempt to authenticate accordingly. See <B>key(1)</B> for more in-
		formation on S/Key authentication. S/Key is a Trademark of
		Bellcore.

	   2.	The login name must not appear in the file <I>/etc/ftpusers</I>.

	   3.	The login name must not be a member of a group specified in
		the file <I>/etc/ftpusers</I>. Entries in this file interpreted as
		group names are prefixed by an &quot;at&quot; `@' sign.

	   4.	The user must have a standard shell returned by
		<B>getusershell(3)</B>.

	   5.	If the user name appears in the file <I>/etc/ftpchroot</I>, or the
		user is a member of a group with a group entry in this file,
		i.e. one prefixed with `@', the session's root will be changed
		to the user's login directory by <B>chroot(2)</B> as for an
		``anonymous'' or ``ftp'' account (see next item).  This facil-
		ity may also be triggered by enabling the boolean &quot;ftp-chroot&quot;
		capability in <B>login.conf(5)</B>.  However, the user must still
		supply a password.  This feature is intended as a compromise
		between a fully anonymous account and a fully privileged ac-
		count.	The account should also be set up as for an anonymous
		account.

	   6.	If the user name is ``anonymous'' or ``ftp'', an anonymous ftp
		account must be present in the password file (user ``ftp'').
		In this case the user is allowed to log in by specifying any
		password (by convention an email address for the user should
		be used as the password).  When the <B>-S</B> option is set, all
		transfers are logged as well.

     In the last case, <B>ftpd</B> takes special measures to restrict the client's
     access privileges.  The server performs a <B>chroot(2)</B> to the home directory
     of the ``ftp'' user.  In order that system security is not breached, it
     is recommended that the ``ftp'' subtree be constructed with care, follow-
     ing these rules:

	   <I>~ftp</I>      Make the home directory owned by ``root'' and unwritable
		     by anyone.

	   <I>~ftp/bin</I>  Make this directory owned by ``root'' and unwritable by
		     anyone (mode 555).  The program <B>ls(1)</B> must be present to
		     support the list command.	This program should be mode
		     111.

	   <I>~ftp/etc</I>  Make this directory owned by ``root'' and unwritable by
		     anyone (mode 555).  The files pwd.db (see <B>passwd(5)</B>)  and
		     <B>group(5)</B> must be present for the ls command to be able to
		     produce owner names rather than numbers.  The password
		     field in passwd is not used, and should not contain real
		     passwords.  The file <I>ftpmotd</I>, if present, will be printed
		     after a successful login.	These files should be mode
		     444.

	   <I>~ftp/pub</I>  Make this directory mode 777 and owned by ``ftp''. Guests
		     can then place files which are to be accessible via the
		     anonymous account in this directory.

     If the system has multiple IP addresses, <B>ftpd</B> supports the idea of virtu-
     al hosts, which provides the ability to define multiple anonymous ftp ar-
     eas, each one allocated to a different internet address.  The file
     <I>/etc/ftphosts</I> contains information pertaining to each of the virtual
     hosts.  Each host is defined on its own line which contains a number of
     fields separated by whitespace:

	   hostname  Contains the hostname or IP address of the virtual host.

	   user      Contains a user record in the system password file.  As
		     with normal anonymous ftp, this user's access uid, gid
		     and group memberships determine file access to the anony-
		     mous ftp area.  The anonymous ftp area (to which any user
		     is chrooted on login) is determined by the home directory
		     defined for the account.  User id and group for any ftp
		     account may be the same as for the standard ftp user.

	   statfile  File to which all file transfers are logged, which de-
		     faults to <I>/var/log/ftpd</I>.

	   welcome   This file is the welcome message displayed before the
		     server ready prompt.  It defaults to <I>/etc/ftpwelcome</I>.

	   motd      This file is displayed after the user logs in.  It de-
		     faults to <I>/etc/ftpmotd</I>.

     Lines beginning with a '#' are ignored and can be used to include com-
     ments.

     Defining a virtual host for the primary IP address or hostname changes
     the default for ftp logins to that address.  The 'user', 'statfile',
     'welcome' and 'motd' fields may be left blank, or a single hypen '-' used
     to indicate that the default value is to be used.

     As with any anonymous login configuration, due care must be given to set-
     up and maintenance to guard against security related problems.

     If compiled with the <I>INTERNAL</I><B>_</B><I>LS</I> option, <B>ftpd</B> will have internal support
     for handling remote requests to list files, and will not execute <I>/bin/ls</I>
     in either a chrooted or non-chrooted environment.	In this case, the
     <I>~/bin/ls</I> executable need not be placed into the chrooted tree, nor need
     the <I>~/bin</I> directory exist.  This support may be added by making ftpd with
     the <I>FTPD</I><B>_</B><I>INTERNAL</I><B>_</B><I>LS</I> variable set either in <I>/etc/make.conf</I> or in the
     shell's environment.</PRE>
<H2>FILES</H2><PRE>     /etc/ftpusers    List of unwelcome/restricted users.
     /etc/ftpchroot   List of normal users who should be chroot'd.
     /etc/ftphosts    Virtual hosting configuration file.
     /etc/ftpwelcome  Welcome notice.
     /etc/ftpmotd     Welcome notice after login.
     /var/run/nologin
		      Displayed and access refused.
     /var/log/ftpd    Log file for anonymous transfers.</PRE>
<H2>SEE ALSO</H2><PRE>     <B><A HREF="ftp.html">ftp(1)</A></B>,  <B>key(1)</B>,  <B>getusershell(3)</B>,  <B>login.conf(5)</B>,  <B>inetd(8)</B>,  <B>syslogd(8)</B></PRE>
<H2>BUGS</H2><PRE>     The server must run as the super-user to create sockets with privileged
     port numbers.  It maintains an effective user id of the logged in user,
     reverting to the super-user only when binding addresses to sockets.  The
     possible security holes have been extensively scrutinized, but are possi-
     bly incomplete.</PRE>
<H2>HISTORY</H2><PRE>     The <B>ftpd</B> command appeared in 4.2BSD.

4.2 Berkeley Distribution	April 19, 1994				     5</PRE></DIV></BODY></HTML>
